package com.ruoyi.a2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.a2.mapper.AisStaticInfoMapper;
import com.ruoyi.a2.domain.AisStaticInfo;
import com.ruoyi.a2.service.IAisStaticInfoService;

/**
 * AIS静态信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-20
 */
@Service
public class AisStaticInfoServiceImpl extends ServiceImpl<AisStaticInfoMapper, AisStaticInfo> implements IAisStaticInfoService
{
    @Autowired
    private AisStaticInfoMapper aisStaticInfoMapper;

    /**
     * 查询AIS静态信息
     *
     * @param id AIS静态信息主键
     * @return AIS静态信息
     */
    @Override
    public AisStaticInfo selectAisStaticInfoById(Long id)
    {
        return aisStaticInfoMapper.selectAisStaticInfoById(id);
    }

    /**
     * 查询AIS静态信息列表
     *
     * @param aisStaticInfo AIS静态信息
     * @return AIS静态信息
     */
    @Override
    public List<AisStaticInfo> selectAisStaticInfoList(AisStaticInfo aisStaticInfo)
    {
        return aisStaticInfoMapper.selectAisStaticInfoList(aisStaticInfo);
    }

    /**
     * 新增AIS静态信息
     *
     * @param aisStaticInfo AIS静态信息
     * @return 结果
     */
    @Override
    public int insertAisStaticInfo(AisStaticInfo aisStaticInfo)
    {
        aisStaticInfo.setCreateTime(DateUtils.getNowDate());
        return aisStaticInfoMapper.insertAisStaticInfo(aisStaticInfo);
    }

    /**
     * 修改AIS静态信息
     *
     * @param aisStaticInfo AIS静态信息
     * @return 结果
     */
    @Override
    public int updateAisStaticInfo(AisStaticInfo aisStaticInfo)
    {
        aisStaticInfo.setUpdateTime(DateUtils.getNowDate());
        return aisStaticInfoMapper.updateAisStaticInfo(aisStaticInfo);
    }

    /**
     * 批量删除AIS静态信息
     *
     * @param ids 需要删除的AIS静态信息主键
     * @return 结果
     */
    @Override
    public int deleteAisStaticInfoByIds(Long[] ids)
    {
        return aisStaticInfoMapper.deleteAisStaticInfoByIds(ids);
    }

    /**
     * 删除AIS静态信息信息
     *
     * @param id AIS静态信息主键
     * @return 结果
     */
    @Override
    public int deleteAisStaticInfoById(Long id)
    {
        return aisStaticInfoMapper.deleteAisStaticInfoById(id);
    }
}
